package com.mtnz.njk.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
* @Description:    优惠券基本信息实体类
* @Author:         FBL
* @CreateDate:     2019\7\22 0022 11:02
* @Version:        1.0
*/
@Table(name = "coupon")
@Data
public class CouponEntity {
    @Id
    @Column(name = "coupon_id")
    private Integer couponId;
    @Column(name = "sub_money")
    private Integer subMoney;
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    @Column(name = "user_id")
    private String userId;
    @Column(name = "coupon_img")
    private String couponImg;
    @Column(name = "coupon_explain")
    private String couponExplain;
    @Column(name = "coupon_type_id")
    private Integer couponTypeId;
    @Column(name = "del_flag")
    private Integer delFlag;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @Transient
    private String couponScope;
    @Transient
    private CouponTypeEntity couponTypeEntity;

}
